﻿<div class="m-subheader ">
    <div class="d-flex align-items-center">
        <div class="mr-auto col-xs-6">
            <h3 class="m-subheader__title m-subheader__title--separator">
                <span>{{ title }}</span>
            </h3>
            <span style="display: inline-block; width: 250px;">
                <span style="margin-left:10px;">选择时间：</span>
                <div style="width:120px;display:inline-block;">
                    <p-calendar
                        [(ngModel)]="selectedDate"
                        view="month"
                        dateFormat="yy-mm"
                        [yearNavigator]="true"
                        yearRange="2000:2030"
                        [locale]="calendarHelper.cn"
                    ></p-calendar>
                </div>
            </span>
            <!-- <button
                class="btn btn-warning"
                type="button"
                (click)="importRecordModal.show(excelType)"
                style="margin-left: 20px;"
            >
                查看历史记录
            </button> -->
        </div>
        <div class="col-xs-6 text-right">
            <span *ngIf="fileName" style="margin-right:20px; color: #20c997;">{{ fileName }}</span>
            <excel-import
                #excelImport
                showIcon="false"
                isLink="false"
                btnColor="success"
                btnText="导入(按导出模板)"
                (onUpload)="onUpload($event)"
            ></excel-import>
            <excel-export
                showIcon="false"
                isLink="false"
                btnColor="warning"
                btnText="导出模板"
                [fileName]="excelConfig['name']"
                [data]="excelConfig['templData']"
            ></excel-export>
            <button class="btn btn-primary" (click)="confirmImport()" style="margin-left: 10px;">确认导入</button>
        </div>
    </div>
</div>
<div class="m-content">
    <div class="m-portlet m-portlet--mobile">
        <div class="m-portlet__body">
            <div class="row align-items-center">
                <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
                    <excel-preview
                        [fileData]="fileData"
                        readonly="true"
                        (onSheetChange)="onSheetChange($event)"
                    ></excel-preview>
                </div>
            </div>
        </div>
    </div>
    <!-- <importRecordModal #importRecordModal></importRecordModal> -->
</div>
